package com.feihao.zhou.log4j;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class Log4jTest {

    //获取Logger对象，记录哪个类的日志信息：
    private static final Logger LOGGER = LoggerFactory.getLogger(Log4jTest.class);
    public static void main(String[] args) {
        LOGGER.debug("debug信息");
        LOGGER.info("info信息");
        LOGGER.warn("warn信息");
        LOGGER.error("erro信息");

        try {
            FileInputStream fis = new FileInputStream("D:\\c.t1xt");
        } catch (FileNotFoundException e) {
            LOGGER.debug("文件找不到异常",e);
        }
    }
}
